{% load mezzanine_tags staticfiles %}

{% editable_loader %}

{% compress js %}
<script src="{% static "mdl/material.min.js" %}"></script>
<script src="{% static "mdl/jquery.2.1.4.min.js" %}"></script>
<script src="{% static "phodal/js/highlight.min.js" %}"></script>
<script src="{% static "phodal/js/jquery.autocomplete.min.js" %}"></script>
<script src="{% static "phodal/js/jquery.smartbanner.js" %}"></script>
{% block extra_js %}
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
$(function() {
 function choiceSystem () {
    if( /(android)/i.test(navigator.userAgent) ) {
        return 'android';
    } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
        return 'ios';
    } else if (/windows phone/i.test(navigator.userAgent.toLowerCase())) {
        return 'windows';
    }
 }

 $.smartbanner({
  title: 'Growth - 成为顶尖开发者', // What the title of the app should be in the banner (defaults to <title>)
  author: "Phodal Huang", // What the author of the app should be in the banner (defaults to <meta name="author"> or hostname)
  price: 'FREE', // Price of the app
  appStoreLanguage: 'us', // Language code for App Store
  inAppStore: 'On the App Store', // Text of price for iOS
  inGooglePlay: 'In Google Play', // Text of price for Android
  force: choiceSystem(),
  inWindowsStore: 'In the Windows Store', // Text of price for Windows
  button: '查看', // Text for the install button
  iOSUniversalApp: true, // If the iOS App is a universal app for both iPad and iPhone, display Smart Banner to iPad users, too.
  appendToSelector: 'body'
 })
});
$( document ).ready(function() {
    $('.middle.mdl-layout__content').css('z-index', 'initial');
    $('.android-content.mdl-layout__content').css('z-index', 'initial');
});
</script>
{% endblock %}
{% endcompress %}


<script>
{% if settings.GOOGLE_ANALYTICS_ID and not request.user.is_staff %}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ settings.GOOGLE_ANALYTICS_ID }}', 'auto');  // Replace with your property ID.
ga('send', 'pageview');
{% endif %}
</script>